Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding picker #14

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

jwendelmuth
Copy link

Adds an EnumProperty that allows to change image encoding from rgb8/rgba8 to bgr8/bgra8.

@@ -185,11 +178,13 @@ CameraPub::CameraPub()
this, SLOT(updateQueueSize()));
queue_size_property_->setMin(1);

frame_rate_property_ = new FloatProperty("Frame Rate", -1,
frame_rate_property_ = new FloatProperty("Frame Rate", 0,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated change.

@lucasw
Copy link
Owner

lucasw commented Aug 31, 2016

This isn't telling ogre to change the pixel format- when changing the encoding the underlying data doesn't change, but the colors get swapped in ros image viewers (which is wrong).

(It looks like the hardcoded encodings currently in 7839c3a are wrong, blue and red channels are swapped, which may be the source of some confusion here.)

Ogre::RenderTarget::copyContentsToMemory docs say "See suggestPixelFormat for a tip as to the best pixel format to extract into, although you can use whatever format you like and the results will be converted.". So the user ought to be able to select from any format that both ros and ogre support (/usr/include/OGRE/OgrePixelFormat.h), and then pf will be set to that format.

It would be nice if the user could be informed what the most efficient format is if they desire low cpu usage, or at least set that as the default.

I assume having ogre originate the image in the desired format is more efficient than post processing the image with opencv to re-order color channels.

@lucasw lucasw force-pushed the master branch 3 times, most recently from 3f0ad2a to 6946422 Compare October 4, 2019 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants